package main

import (
	"fmt"
	"net"
	"net/rpc"
	"net/rpc/jsonrpc"
)

func main() {
	conn, err := net.Dial("tcp", "localhost:8888")
	if err != nil {
		panic("dial error!")
	}
	var replay string
	client := rpc.NewClientWithCodec(jsonrpc.NewClientCodec(conn))
	err = client.Call("ClickService.Click", "image", &replay)
	if err != nil {
		panic(err)
	}
	fmt.Println(replay)
}
